2020-2021 Sunseeker Telemetry and Lighting System
adc12_a_ex1_avccRef.c File Reference
#include "driverlib.h"

Go to the source code of this file.

Functions

void main (void)
 
void ADC12_A_ISR (void)
 

Function Documentation

◆ ADC12_A_ISR()

void ADC12_A_ISR ( void  )

◆ main()

void main ( void  )

ADC12_A - Sample A0 Input, AVcc Ref, LED ON if A0 > 0.5*AVcc MSP430F552x Demo

Description: A single sample is made on A0 with reference to AVcc. Software sets ADC12SC to start sample and conversion - ADC12SC automatically cleared at EOC. ADC12_A internal oscillator times sample (16x) and conversion. In Mainloop MSP430 waits in LPM0 to save power until ADC12_A conversion complete, ADC12_A_ISR will force exit from LPM0 in Mainloop on reti. If A0 > 0.5*AVcc, P1.0 set, else reset.

          MSP430F552x
      -----------------
  /|\|                 |
   | |                 |
   --|RST       P6.0/A0|<- Vin
     |             P1.0|--> LED
     |                 |

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

  • ADC12_A peripheral
  • GPIO Port peripheral
  • A0

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

  • ADC12_A_VECTOR

Definition at line 68 of file adc12_a_ex1_avccRef.c.

References __no_operation(), and param.